package com.ztesoft.train.ssh.dao;

import java.util.List;
/**
 * provide the dao interface, include commons method,example query(findById, findAll), save, update, delete
 * @author ztesoft
 *
 */
public interface DaoInterface {
	/**
	 * Get Entity with the associated id.
	 * @param id - entity ID
	 * @return Object entity
	 */
	public Object findbyId(Object id);
	
	/**
	 * Get all Object entities.
	 * @return collection of Object entities
	 */
	public List<?> findAll();
	
	/**
	 * Update the data repository with the 
	 * state of the provided Object entity.
	 * @param Object entity
	 */
	public void update(Object entity);
	
	/**
	 * Remove the associated Object
	 * record from the data repository.
	 * @param entity
	 */
	public void delete(Object entity);
	
	
	/**
	 * Save the state of the provided
	 * Object entity into the data
	 * repository.
	 * @param entity
	 */
	public void save(Object entity); 
}
